package com.van.bo.badwrting.edit.dao;


import com.van.bo.badwrting.edit.domain.JavaDataInES;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface DataDao extends ElasticsearchRepository<JavaDataInES, String> {
    Page<JavaDataInES> findAll(Pageable pageable);


    Iterable<JavaDataInES> findAll(Sort sort);

//    @Query("{\"match\": {\"username\": {\"query\": \"?0\"}}}")
//    List<JavaDataInES> findByUsername(String username);
//
//    List<JavaDataInES> findByAgeBetween(Long mix, Long max);
//
//    Long countByAgeBetween(Long mix, Long max);
}
